import { AUTHENTICATE, AUTHENTICATE_FAILURE } from '../mutation-types'
import Vue from 'vue'

// initial State
const state = {
  token: null,
  failure: null
}

// mutations
const mutations = {

  [AUTHENTICATE] (state, response) {
    state.token = response.token;
  },

  [AUTHENTICATE_FAILURE] (state, error) {
    state.failure = error;
  },

  // other mutations

}

export default {
  state,
  mutations
}
